package entrepot;

public class Produit implements Comparable{
	
	String nom;
	int id;
	int poids; // en grammes
	int position;
	public Produit(String nom, int id, int poids, int position) {
		super();
		this.nom = nom;
		this.id = id;
		this.poids = poids;
		this.position=position;
	}
	
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getPoids() {
		return poids;
	}
	public void setPoids(int poids) {
		this.poids = poids;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	@Override
	public int compareTo(Object arg0) {
		return this.position - ((Produit) arg0).position;
	}
}
